package acm.蓝桥杯1;

import java.util.Scanner;

public class 元素交换 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n*2];
        for (int i = 0; i < 2*n; i++) {
            arr[i] = sc.nextInt();
        }
        int select0 = fun(arr, 0);
        int select1 = fun(arr, 1);
        int res = Math.min(select0, select1);
        System.out.println(res);
    }

    /**
     * 暴力解
     * 假设头位置是1的情况和0的情况
     * 找出不符合情况的位置，
     */
    public static int fun(int[] arr, int flag) {
        int count=0;
        for (int i = 0; i < arr.length; i++) {
            if (i % 2 == 0 && arr[i] != flag) {
                count++;
            }
        }
        return count;
    }
}
